<template>
  <div class="event-wrap">
    <div class="crumbs">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>
          <i class="el-icon-fa fa-book"></i> 活动报告
        </el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="report" id="pdfDom">
      <div class="report-title">
        <span>活动报告</span>
      </div>
      <div class="container">
        <el-form :model="entityForm" class="info-form" label-width="80px">
          <el-form-item label="团长号">
            <el-input v-model="entityForm.number"></el-input>
          </el-form-item>
          <el-form-item label="姓名">
            <el-input v-model="entityForm.name"></el-input>
          </el-form-item>
          <el-form-item label="地区">
            <el-input v-model="entityForm.areaName"></el-input>
          </el-form-item>
          <el-form-item label="活动">
            <el-input v-model="entityForm.activityName"></el-input>
          </el-form-item>
          <el-form-item label="团队">
            <el-input v-model="entityForm.teamName"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div class="container">
        <div class="table">
          <el-table :data="tableData" stripe>
            <el-table-column label="项目Id" prop="id" />
            <el-table-column label="项目名" prop="name" />
            <el-table-column label="团最大人数" prop="number" />
            <el-table-column label="推荐指数" prop="rate" />
            <el-table-column label="项目开始时间" prop="time" />
            <el-table-column label="出发点" prop="location" />
            <el-table-column label="已选项目人数" prop="selectedCount" />
          </el-table>
        </div>
      </div>
    </div>
    <div class="pdfbutton" style="text-align: center">
      <el-button @click="getPdf()" icon="el-icon-plus" type="primary" style="text-align: right">下载</el-button>
    </div>
  </div>
</template>

<script>
import * as api from "../../api/leader/event";
export default {
  name: "ActivityReport",
  data() {
    return {
      entityForm: {
        number: "",
        name: "",
        areaName: "",
        activityName: "",
        teamName: ""
      },
      tableData: []
    };
  },
  methods: {
    getList() {
      api.list().then(res => {
        this.tableData = res;
      });
    }
  },
  created() {
    this.getList();
  }
};
</script>

<style scoped>
  .report-title {
    width: 100%;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
    color:black;
    border-bottom: 1px solid #ddd;
  }
  .container{
    margin-top: 10px;
  }
  .pdfbutton{
    margin-top: 40px;
    margin-bottom: 40px;
  }
</style>
